package com.module.lemlin.base

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import io.reactivex.rxjava3.disposables.CompositeDisposable
import org.greenrobot.eventbus.EventBus

open class BaseViewModel(application: Application) : AndroidViewModel(application) {

    val dispose: CompositeDisposable = CompositeDisposable()

    override fun onCleared() {
        if (dispose.size() > 0 && !dispose.isDisposed) {
            dispose.dispose()
        }

    }


}